
export const initWalletConnect = async () => {
  const { default: WalletConnectProvider } = await import('@walletconnect/web3-provider/dist/umd/index.min.js')
  const externalProvider = new WalletConnectProvider({
    // Required
    rpc: {
      1: 'https://mainnet.infura.io/v3/4442accd5dc64da6a6a0450f38a6018f',
      5: 'https://goerli.infura.io/v3/4442accd5dc64da6a6a0450f38a6018f',
    },
    // qrcode: false,
  })

  const { Web3Provider } = await import('@ethersproject/providers')
  const provider = new Web3Provider(externalProvider)
  const signer = provider.getSigner()
  return { provider, signer, externalProvider }
}
